import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import 'default-passive-events'
// 全局通用自定义指令
import AllDirective from '@/lib/directives'
// 全局过滤器
import filters from '@/lib/filters'
const filter_log = []
Object.keys(filters).forEach(key => {
  filter_log.push(`【${key}】 组件内部{{ XXX | ${key} }}`)
  Vue.filter(key, filters[key])
})
console.info(
  `%c 过滤器注册成功 %c 无需单独引入，页面组件直接使用，如下：%c`,
  'background:#35495e; padding: 2px; border-radius: 3px 0 0 3px;  color: #fff',
  'background: rgba(65,184,131, 1); padding: 2px; border-radius: 0; letter-spacing: 2px; color: rgba(0,0,0, .5)',
  'background: transparent'
)
console.log(filter_log)
Vue.config.productionTip = false
Vue.use(AllDirective)
Vue.use(Element, { size: 'mini' })
const log = process.env
console.log(
  `%c 当前系统环境 %c 【${log.NODE_ENV}】 %c`,
  'background:rgba(0,0,0,.5) ; padding: 5px; border-radius: 3px 0 0 3px;  color: #fff',
  'background: rgba(0,0,0,1) ; padding: 5px 50px; border-radius: 0 3px 3px 0;  color: #fff',
  'background:transparent'
)
console.log(log)
new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
